<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>

    </h:head>
    <h:body>
        <ui:composition template="/template.xhtml">
             <ui:define name="title">
             Modern Flavor- online restaurant service
         </ui:define>
            <ui:define name="content">
                <c:if test="#{userBean.curentUser == null}">
                    Вы не авторизировались. Авторизируйтесь!                
                </c:if>
                <c:if test="#{userBean.curentUser != null}">
                    <h:form>
                        <h:message for="userAdd"/>
                        <table>
                            <tr>
                                <td> Ваш email:</td>
                                <td><h:inputText id="useremail" value="#{userBean.curentUser.email}" /></td>
                            </tr>
                            <tr>
                                <td>Ваш телефон:</td>
                                <td><h:inputText id="userphone" value="#{userBean.curentUser.phone}"/></td>
                            </tr>
                        </table>

                        <h:commandButton action="#{userBean.userEdit}" value="Обновить"/>
                            
                        
                    </h:form>
             
                </c:if>
                
            </ui:define>
        </ui:composition>
            
</h:body>

</html>

